package com.feri.rbacsys.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.Date;

/**
 * @description: 实体层 和数据库的表一一对应
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@TableName("t_oss")
public class Oss {
    /**
    *序号，主键 */
     @TableId(type = IdType.AUTO)
    private Integer id;
    /**
    *存储空间名 */
    private String bname;
    /**
    *对象名称 */
    private String objname;
    /**
    *访问地址 */
    private String url;
    /**
    *类型：1.图片 2.视频 */
    private Integer type;
    /**
    *创建时间 */
    private Date createTime;
    /**
    *访问地址失效日期 */
    private Date edate;

    public Oss(String bname, String objname, String url, Integer type, Date edate) {
        this.bname = bname;
        this.objname = objname;
        this.url = url;
        this.type = type;
        this.edate = edate;
        this.createTime=new Date();
    }
}
